package cn.lg.org.mapper;

import cn.lg.org.domain.Department;
import cn.lg.org.query.DepartmentQuery;

import java.util.List;

/**
 * 部门mapper接口
 */
public interface DepartmentMapper {
    /**
     * 查询所有
     * @return
     */
    List<Department> loadAll();

    /**
     * 查询单个
     * @param id
     * @return
     */
    Department loadById(Long id);

    /**
     * 保存对象
     * @param department
     */
    void save(Department department);

    /**
     * 修改对象
     * @param department
     */
    void update(Department department);

    /**
     * 移除对象
     * @param id
     */
    void remove(Long id);

    /**
     * 查询总数据量
     * @param departmentQuery
     * @return
     */
    Integer queryCount(DepartmentQuery departmentQuery);

    /**
     * 查询当前页数据
     * @param departmentQuery
     * @return
     */
    List<Department> queryData(DepartmentQuery departmentQuery);



    /**
     * 批量删除
     * @param ids
     */
    void patchRemove(List<Long> ids);
}
